home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1996 April: Mac OS SDK / Dev.CD Apr 96 SDK / Dev.CD Apr 96 SDK1.toast / Development Kits (Disc 1) / OpenDoc / Sample Code / Sample Editors⁄Viewers / Text Editor / Source / TextEditorGlobals.h < prev    next >
Encoding:
C/C++ Source or Header  |  1995-12-13  |  2.8 KB  |  120 lines  |  [TEXT/MPS ]

  1. /*
  2.     File:        TextEditorGlobals.h
  3.  
  4.     Contains:    TextEditor globals
  5.  
  6.     Written by:    Dave Stafford
  7.  
  8.     Copyright:    © 1995 by Apple Computer, Inc., all rights reserved.
  9. */
  10.  
  11. #ifndef _TEXTEDITORGLOBALS_
  12. #define _TEXTEDITORGLOBALS_
  13.  
  14. #ifndef SOM_Module_OpenDoc_Global_TypesB_defined
  15. #include <ODTypesB.xh>
  16. #endif
  17.  
  18. // -- OpenDoc Public Utilities --
  19.  
  20. #ifndef _ITEXT_
  21. #include <IText.h>        // for ODScriptCode and ODLangCode
  22. #endif
  23.  
  24. //------------------------------------------------------------------------------
  25. // Forward declarations
  26. //------------------------------------------------------------------------------
  27.  
  28. struct TextEditorGlobals;
  29.  
  30. class ODMenuBar;
  31. class ODFocusSet;
  32.  
  33. //------------------------------------------------------------------------------
  34. // Globals
  35. //------------------------------------------------------------------------------
  36.  
  37. extern    ODUShort            gGlobalsUsageCount;
  38. extern    TextEditorGlobals*    gGlobals;
  39.  
  40. //------------------------------------------------------------------------------
  41. // Globals struct
  42. //------------------------------------------------------------------------------
  43.  
  44. struct TextEditorGlobals 
  45. {
  46.     TextEditorGlobals();
  47.  
  48.     ODMenuBar*        fMenuBar;
  49.     ODFocusSet*        fUIFocusSet;
  50.     
  51.     ODTypeToken        fSelectionFocus;
  52.     ODTypeToken        fClipboardFocus;
  53.     ODTypeToken        fMenuFocus;
  54.     ODTypeToken        fModalFocus;
  55.     ODTypeToken        fKeyFocus;
  56.     
  57.     ODTypeToken        fFrameView;
  58.     ODTypeToken        fLargeIconView;
  59.     
  60.     ODTypeToken        fSmallIconView;
  61.     ODTypeToken        fThumbnailView;
  62.     ODTypeToken        fMainPresentation;
  63.     ODTypeToken        fRulerPresentation;
  64.     ODTypeToken        fUndefinedPresentation;
  65.     
  66.     ODTypeToken        fNativeData;
  67.     ODTypeToken        fImportedData;
  68.     ODTypeToken        fStyledTextData;
  69.     
  70.     ODValueType        fAppleHFSFlavor;
  71.     ODValueType        fScrapTextValue;
  72.     ODValueType        fStyledTextKind;
  73.     ODValueType        fTextFileValue;
  74.     
  75.     Handle            fThumbnail;
  76.     
  77.     ODScriptCode    fEditorsScript;
  78.     ODLangCode        fEditorsLanguage;
  79. };
  80.  
  81. //------------------------------------------------------------------------------
  82. // Globals struct
  83. //------------------------------------------------------------------------------
  84.  
  85. inline TextEditorGlobals::TextEditorGlobals()
  86.     fMenuBar                = kODNULL;
  87.     fUIFocusSet                = kODNULL;
  88.  
  89.     fSelectionFocus            = kODNullTypeToken;
  90.     fClipboardFocus            = kODNullTypeToken;
  91.     fMenuFocus                = kODNullTypeToken;
  92.     fModalFocus                = kODNullTypeToken;
  93.     fKeyFocus                = kODNullTypeToken;
  94.  
  95.     fFrameView                = kODNullTypeToken;
  96.     fLargeIconView            = kODNullTypeToken;
  97.  
  98.     fSmallIconView            = kODNullTypeToken;
  99.     fThumbnailView            = kODNullTypeToken;
  100.     fMainPresentation        = kODNullTypeToken;
  101.     fRulerPresentation        = kODNullTypeToken;
  102.  
  103.     fNativeData                = kODNullTypeToken;
  104.     fImportedData            = kODNullTypeToken;
  105.     fStyledTextData            = kODNullTypeToken;
  106.     
  107.     fAppleHFSFlavor            = kODNULL;
  108.     fScrapTextValue            = kODNULL;
  109.     fStyledTextKind            = kODNULL;
  110.     fTextFileValue            = kODNULL;
  111.     
  112.     fThumbnail                = kODNULL;
  113.     
  114.     fEditorsScript            = 0;
  115.     fEditorsLanguage        = 0;
  116. }
  117.  
  118.  
  119. #endif